package hoodoos.rule.core;

import hoodoos.rule.api.Facts;
import java.util.HashMap;
import java.util.Map;

/**
 * Record接口
 */
public class DefaultFacts implements Facts {
  private boolean refuse = false;
  private Map<String, Object> mapData = new HashMap<>();

  @Override
  public boolean isRefuse() {
    return refuse;
  }

  @Override
  public void setRefuse(boolean refuse) {
    this.refuse = refuse;
  }

  @Override
  public void setString(String key, String value) {
    mapData.put(key, value);
  }

  @Override
  public String getString(String key) {
    return (String) mapData.get(key);
  }
}
